package com.zelix;

import java.io.*;
import java.util.HashSet;
import java.util.Hashtable;

final class b6 extends kt
        implements sm {

    private boolean j;
    private String k;
    private zs l;
    private int m;
    private z5 n[];
    private mt o;
    private int p;
    private static String z[];

    b6(kt kt1, jb jb, qy qy1)
            throws IOException, dc {
        super(kt1);

        int i1;
        j = true;
        int i = jb.readUnsignedShort();
        is is1 = a(i);
        if (is1 != null && (is1 instanceof zs)) {
            l = (zs) is1;
            qy1.b(l, this);

        } else {
            j = false;
            k = z[1] + i + (is1 == null ? "" : z[0] + is1.l());
            return;
        }

        m = jb.readUnsignedShort();
        n = new z5[m];
        for (i1 = 0; i1 < m; i1++) {
            n[i1] = new z5(this, jb, qy1);
            if (!n[i1].b()) {
                j = false;
                k = n[i1].a();
                return;
            }
        }
    }

    public void b(Hashtable hashtable) {
        int i;

        String s2;

        if (o != null) {
            String s = lt.d(l.b());
            String s1 = (String) px.a(s, hashtable);
            if (!s1.equals(s)) {

                s1 = "L" + s1 + ";";
                if (p > 0) {
                    s2 = zu.a(s1, 'R', s1.length() + p, '[');

                } else {
                    s2 = s1;
                }

                l.a(s2);
            }
        }
        for (i = 0; i < m; i++) {
            n[i].b(hashtable);

        }
    }

    public void a(zs zs1, zs zs2) {
        if (l == zs1)
            l = zs2;
    }

    public String a() {
        return k;
    }

    public boolean b() {
        return j;
    }

    public void a(HashSet hashset, HashSet hashset1, HashSet hashset2, HashSet hashset3) {
        int i;
        if (o != null)
            hashset.add(o);
        for (i = 0; i < m; i++) {
            n[i].a(o, hashset, hashset1, hashset2, hashset3);

        }
    }

    final void a(HashSet hashset) {
        int i;
        for (i = 0; i < m; i++) {
            n[i].a(hashset);

        }
    }

    void a(Hashtable hashtable) {
        int i;
        hashtable.put(l, l);
        for (i = 0; i < m; i++) {
            n[i].a(hashtable);
        }
    }

    public void a() {
        int i;
        for (i = 0; i < m; i++) {
            n[i].a();

        }

    }

    public void a(yg yg) {
        int i;
        sx sx1 = new sx(0);
        String s = lt.a(l.b(), sx1);
        o = fh.a(s);
        p = sx1.b();
        for (i = 0; i < m; i++) {
            n[i].a(o, yg);

        }
    }

    protected void a(DataOutputStream dataoutputstream, Hashtable hashtable, nh nh)
            throws IOException, tb {
        int i;

        zs zs1 = (zs) hashtable.get(l);
        if (zs1 != null) {
            dataoutputstream.writeShort(zs1.j());
        } else {
            dataoutputstream.writeShort(l.j());
        }
        dataoutputstream.writeShort(m);
        for (i = 0; i < m; i++) {
            n[i].a(dataoutputstream, hashtable, nh);

        }
    }

    private static String z(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0x6b;
                    break;
                case 1:
                    key = 10;
                    break;
                case 2:
                    key = 72;
                    break;
                case 3:
                    key = 75;
                    break;
                default:
                    key = 106;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static {
        String as[];
        as = new String[2];
        as[0] = z("K0h?\013\f7".toCharArray());
        as[1] = z("\"d>*\006\002nh?\023\033oh\"\004\017o0kPK".toCharArray());
        z = as;
    }
}